package com.ruoyi.marketers.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.marketers.mapper.UserMerchantsCouponMapper;
import com.ruoyi.marketers.domain.UserMerchantsCoupon;
import com.ruoyi.marketers.service.IUserMerchantsCouponService;

/**
 * 用户优惠劵对象Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-13
 */
@Service
public class UserMerchantsCouponServiceImpl implements IUserMerchantsCouponService 
{
    @Autowired
    private UserMerchantsCouponMapper userMerchantsCouponMapper;

    /**
     * 查询用户优惠劵对象
     * 
     * @param id 用户优惠劵对象主键
     * @return 用户优惠劵对象
     */
    @Override
    public UserMerchantsCoupon selectUserMerchantsCouponById(Long id)
    {
        return userMerchantsCouponMapper.selectUserMerchantsCouponById(id);
    }

    /**
     * 查询用户优惠劵对象列表
     * 
     * @param userMerchantsCoupon 用户优惠劵对象
     * @return 用户优惠劵对象
     */
    @Override
    public List<UserMerchantsCoupon> selectUserMerchantsCouponList(UserMerchantsCoupon userMerchantsCoupon)
    {
        return userMerchantsCouponMapper.selectUserMerchantsCouponList(userMerchantsCoupon);
    }

    /**
     * 新增用户优惠劵对象
     * 
     * @param userMerchantsCoupon 用户优惠劵对象
     * @return 结果
     */
    @Override
    public int insertUserMerchantsCoupon(UserMerchantsCoupon userMerchantsCoupon)
    {
        return userMerchantsCouponMapper.insertUserMerchantsCoupon(userMerchantsCoupon);
    }

    /**
     * 修改用户优惠劵对象
     * 
     * @param userMerchantsCoupon 用户优惠劵对象
     * @return 结果
     */
    @Override
    public int updateUserMerchantsCoupon(UserMerchantsCoupon userMerchantsCoupon)
    {
        return userMerchantsCouponMapper.updateUserMerchantsCoupon(userMerchantsCoupon);
    }

    /**
     * 批量删除用户优惠劵对象
     * 
     * @param ids 需要删除的用户优惠劵对象主键
     * @return 结果
     */
    @Override
    public int deleteUserMerchantsCouponByIds(Long[] ids)
    {
        return userMerchantsCouponMapper.deleteUserMerchantsCouponByIds(ids);
    }

    /**
     * 删除用户优惠劵对象信息
     * 
     * @param id 用户优惠劵对象主键
     * @return 结果
     */
    @Override
    public int deleteUserMerchantsCouponById(Long id)
    {
        return userMerchantsCouponMapper.deleteUserMerchantsCouponById(id);
    }
}
